// 模拟产品变体数据
export const mockProductVariants = {
  // 发光字产品的变体
  'led-sign': [
    {
      id: 'led-acrylic',
      name: '亚克力发光字',
      description: '透明亚克力材质，光线柔和均匀，适合室内外使用',
      basePrice: 280,
      images: [
        'https://trae-api-sg.mchost.guru/api/ide/v1/text_to_image?prompt=acrylic%20LED%20illuminated%20letters%20modern%20design&image_size=square',
        'https://trae-api-sg.mchost.guru/api/ide/v1/text_to_image?prompt=acrylic%20LED%20sign%20night%20illumination&image_size=square',
        'https://trae-api-sg.mchost.guru/api/ide/v1/text_to_image?prompt=acrylic%20LED%20letters%20installation%20process&image_size=square'
      ],
      specifications: {
        '材质': '进口亚克力板',
        '厚度': '8-15mm',
        '光源': '高亮度LED灯带',
        '防护等级': 'IP65',
        '使用寿命': '50000小时',
        '工作温度': '-20°C至+60°C'
      },
      parameters: [
        {
          id: 'thickness',
          name: '字体厚度',
          type: 'select' as const,
          required: true,
          description: '厚度影响立体效果和价格',
          options: [
            { label: '8mm（标准）', value: '8mm', priceModifier: 0 },
            { label: '10mm（推荐）', value: '10mm', priceModifier: 50 },
            { label: '12mm（加厚）', value: '12mm', priceModifier: 100 },
            { label: '15mm（超厚）', value: '15mm', priceModifier: 180 }
          ]
        },
        {
          id: 'color_temp',
          name: '光源色温',
          type: 'radio' as const,
          required: true,
          description: '不同色温适合不同环境',
          options: [
            { label: '暖白光（3000K）', value: '3000k', priceModifier: 0 },
            { label: '正白光（4000K）', value: '4000k', priceModifier: 0 },
            { label: '冷白光（6000K）', value: '6000k', priceModifier: 0 },
            { label: 'RGB彩色', value: 'rgb', priceModifier: 120 }
          ]
        },
        {
          id: 'size',
          name: '字体高度',
          type: 'number' as const,
          min: 10,
          max: 200,
          unit: 'cm',
          required: true,
          description: '按字体高度计价',
          priceModifier: 2.5
        }
      ]
    },
    {
      id: 'led-metal',
      name: '不锈钢发光字',
      description: '304不锈钢材质，耐腐蚀性强，适合户外长期使用',
      basePrice: 380,
      images: [
        'https://trae-api-sg.mchost.guru/api/ide/v1/text_to_image?prompt=stainless%20steel%20LED%20illuminated%20letters%20outdoor&image_size=square',
        'https://trae-api-sg.mchost.guru/api/ide/v1/text_to_image?prompt=metal%20LED%20sign%20professional%20installation&image_size=square',
        'https://trae-api-sg.mchost.guru/api/ide/v1/text_to_image?prompt=stainless%20steel%20LED%20letters%20night%20view&image_size=square'
      ],
      specifications: {
        '材质': '304不锈钢',
        '厚度': '1.5-3.0mm',
        '表面处理': '拉丝/镜面/喷漆',
        '光源': '高功率LED模组',
        '防护等级': 'IP67',
        '使用寿命': '80000小时',
        '工作温度': '-40°C至+80°C'
      },
      parameters: [
        {
          id: 'surface_finish',
          name: '表面处理',
          type: 'select' as const,
          required: true,
          description: '不同表面处理效果和价格不同',
          options: [
            { label: '拉丝面（经典）', value: 'brushed', priceModifier: 0 },
            { label: '镜面（高档）', value: 'mirror', priceModifier: 80 },
            { label: '喷漆面（多色）', value: 'painted', priceModifier: 60 }
          ]
        },
        {
          id: 'thickness_metal',
          name: '钢板厚度',
          type: 'radio' as const,
          required: true,
          description: '厚度影响强度和使用寿命',
          options: [
            { label: '1.5mm（室内）', value: '1.5mm', priceModifier: 0 },
            { label: '2.0mm（标准）', value: '2.0mm', priceModifier: 40 },
            { label: '3.0mm（加强）', value: '3.0mm', priceModifier: 100 }
          ]
        },
        {
          id: 'led_power',
          name: 'LED功率',
          type: 'select' as const,
          required: true,
          description: '功率越高亮度越高，适合不同环境',
          options: [
            { label: '标准功率（室内）', value: 'standard', priceModifier: 0 },
            { label: '高功率（户外）', value: 'high', priceModifier: 150 },
            { label: '超高功率（强光环境）', value: 'ultra', priceModifier: 280 }
          ]
        },
        {
          id: 'size_metal',
          name: '字体高度',
          type: 'number' as const,
          min: 15,
          max: 300,
          unit: 'cm',
          required: true,
          description: '按字体高度计价',
          priceModifier: 3.2
        }
      ]
    },
    {
      id: 'led-resin',
      name: '树脂发光字',
      description: '环氧树脂材质，可塑性强，支持复杂造型和渐变效果',
      basePrice: 320,
      images: [
        'https://trae-api-sg.mchost.guru/api/ide/v1/text_to_image?prompt=resin%20LED%20illuminated%20letters%20colorful%20design&image_size=square',
        'https://trae-api-sg.mchost.guru/api/ide/v1/text_to_image?prompt=epoxy%20resin%20LED%20sign%20artistic%20design&image_size=square',
        'https://trae-api-sg.mchost.guru/api/ide/v1/text_to_image?prompt=resin%20LED%20letters%20gradient%20effect&image_size=square'
      ],
      specifications: {
        '材质': '环氧树脂',
        '厚度': '10-20mm',
        '光源': '内置LED灯珠',
        '防护等级': 'IP54',
        '使用寿命': '60000小时',
        '工作温度': '-10°C至+50°C'
      },
      parameters: [
        {
          id: 'resin_effect',
          name: '树脂效果',
          type: 'select' as const,
          required: true,
          description: '不同效果呈现不同视觉感受',
          options: [
            { label: '纯色透明', value: 'transparent', priceModifier: 0 },
            { label: '渐变色彩', value: 'gradient', priceModifier: 80 },
            { label: '星空效果', value: 'starry', priceModifier: 120 },
            { label: '水波纹理', value: 'wave', priceModifier: 100 }
          ]
        },
        {
          id: 'resin_thickness',
          name: '树脂厚度',
          type: 'radio' as const,
          required: true,
          description: '厚度影响光线扩散效果',
          options: [
            { label: '10mm（轻薄）', value: '10mm', priceModifier: 0 },
            { label: '15mm（标准）', value: '15mm', priceModifier: 60 },
            { label: '20mm（厚实）', value: '20mm', priceModifier: 120 }
          ]
        },
        {
          id: 'led_density',
          name: 'LED密度',
          type: 'select' as const,
          required: true,
          description: 'LED密度影响发光均匀度',
          options: [
            { label: '标准密度', value: 'standard', priceModifier: 0 },
            { label: '高密度（推荐）', value: 'high', priceModifier: 100 },
            { label: '超高密度', value: 'ultra', priceModifier: 200 }
          ]
        },
        {
          id: 'size_resin',
          name: '字体高度',
          type: 'number' as const,
          min: 8,
          max: 150,
          unit: 'cm',
          required: true,
          description: '按字体高度计价',
          priceModifier: 2.8
        }
      ]
    }
  ],
  
  // 门头招牌的变体
  'storefront-sign': [
    {
      id: 'acrylic-storefront',
      name: '亚克力门头',
      description: '透明亚克力材质，现代简约风格，适合各类商铺',
      basePrice: 180,
      images: [
        'https://trae-api-sg.mchost.guru/api/ide/v1/text_to_image?prompt=acrylic%20storefront%20signage%20modern%20shop&image_size=square',
        'https://trae-api-sg.mchost.guru/api/ide/v1/text_to_image?prompt=transparent%20acrylic%20shop%20sign%20installation&image_size=square'
      ],
      specifications: {
        '材质': '进口亚克力',
        '厚度': '5-10mm',
        '安装方式': '壁挂式',
        '防护等级': 'IP54'
      },
      parameters: [
        {
          id: 'acrylic_type',
          name: '亚克力类型',
          type: 'select' as const,
          required: true,
          options: [
            { label: '透明亚克力', value: 'transparent', priceModifier: 0 },
            { label: '磨砂亚克力', value: 'frosted', priceModifier: 30 },
            { label: '彩色亚克力', value: 'colored', priceModifier: 50 }
          ]
        },
        {
          id: 'size_area',
          name: '制作面积',
          type: 'number' as const,
          min: 0.5,
          max: 50,
          unit: '㎡',
          required: true,
          description: '按制作面积计价',
          priceModifier: 180
        }
      ]
    }
  ]
};

// 根据产品类型获取变体数据
export const getProductVariants = (productType: string) => {
  return mockProductVariants[productType as keyof typeof mockProductVariants] || [];
};

// 根据产品ID获取默认变体（这里简化处理，实际应该从数据库获取）
export const getDefaultVariantsByProductId = (productId: string) => {
  // 这里可以根据产品ID映射到不同的变体类型
  // 暂时返回发光字的变体作为示例
  return mockProductVariants['led-sign'];
};